from sqlmodel import SQLModel,Field
from typing import Optional


class UserBase(SQLModel):
    username: str = Field(unique=True,index=True)
    email: Optional[str] = None
    full_name: Optional[str] = None
    
    
class User(UserBase,table=True):
    id: Optional[int] = Field(default=None,primary_key=True)
    hashed_password: str = Field(exclude=True)     # 不返回给前端